<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>login</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<!--必要样式-->
<link rel="stylesheet" type="text/css" href="css/component.css" />
	<script src="public/jquery-3.5.1.js"></script>
	<!--[if IE]>
    <script src="js/html5.js"></script>
    <![endif]-->
</head>
<body>
		<div class="container demo-1">
			<div class="content">
				<div id="large-header" class="large-header">
					<canvas id="demo-canvas"></canvas>
					<div class="logo_box">
						<h3>欢迎进入酒店管理系统</h3>
<!--						<form method="post">-->
							<div class="input_outer">
								<span class="u_user"></span>
								<input id="username" name="username" class="text" style="color: #FFFFFF !important" value="admin" type="text" placeholder="请输入账户"/>
							</div>
							<div class="input_outer">
								<span class="us_uer"></span>
								<input id="password" name="password" class="text" style="color: #FFFFFF !important; position:absolute; z-index:100;" value="admin" type="password" placeholder="请输入密码"/>
							</div>
<!--							<div class="mb2">-->
<!--								<button id="login" class="act-but" style="color: #FFFFFF">登录</button>-->
<!--								<a class="act-but submit" href="javascript:;" style="color: #FFFFFF">注册</a>-->
<!--							</div>-->
							<button class="act-but submit" id="loginUser">登录</button>
							<a class="act-but submit" href="userRegister" style="color: #FFFFFF">注册</a>
<!--						</form>-->
					</div>
				</div>
			</div>
		</div><!-- /container -->
		<script src="js/TweenLite.min.js"></script>
		<script src="js/EasePack.min.js"></script>
		<script src="js/rAF.js"></script>
		<script src="js/demo-1.js"></script>
	</body>


<script>
	$("#loginUser").on('click', function () {
		let username = $("#username").val();
		let password = $("#password").val();
		$.ajax({
			url: 'client/login/form',
			type: 'POST',
			dataType: 'text',
			data: {
				"username": username,
				"password": password
			},
			success: function (res) {
				if (res === 'ok') {
					location.href = '/hotal/front/index';
				}else {
					alert("登录失败");
				}
			}
		 })
	})
	// $("#login").on('click', function () {
		// let username = $("#username").val();
		// let password = $("#password").val();
		// alert("西内");
		// $.ajax({
		// 	url: 'client/login/form',
		// 	type: 'POST',
		// 	dataType: 'text',
		// 	data: {
		// 		"username": username,
		// 		"password": password
		// 	},
		// 	success: function (res) {
		// 		alert(res);
		// 	}
		//  })
	// });
</script>
</html>